Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds install docs and dependency files #9

Merged
merged 2 commits into from Feb 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,14 +1,72 @@
# realtimechat

Created with NodeJS, Express, socket.io and redis
Created with NodeJS, Express, socket.io and redis.

## How to get it running on UNIX (OSX, Linux)

# important!
### 1 - Node / NPM

1. use bower to install `socket.io-client`
2. use npm to install `express`, `socket.io` and `redis`
This project depends on Node and its package manager NPM (Node Package Manager).
If you already have those installed, skip to step 2.

You can install Node and NPM using another program called NVM (Node Version Manager).
Let's install NVM first:

# Todo
```sh
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash
```

1. Add npm package.json
Now, let's install a recent Node version:
```sh
nvm install v0.12.0
```

You can now test if Node and NPM are correctly installed by running:
```sh
npm -v
node -v
```

If you see version numbers like `2.5.1` and `v0.12.0`, it means you're good to go!

Awesome! Just a few more steps.

### 2 - Download the chat

Let's download the realtime chat:
```sh
git clone https://github.com/kimhogeling/realtimechat.git && cd realtimechat
```

### 3 - Install chat dependencies

And now, let's install it's dependencies:

```sh
bower install
npm install
```

### 4 - Installing Redis (in memory cache)

Finally, we'll need to install Redis, an in memory cache.

If you're on OSX, you can install it using [Brew](http://brew.sh):
```sh
brew install redis
```

If you're on a Debian based Linux (Ubuntu, Elementary, ...), you can do:
```sh
sudo apt-get install redis
```

### 5 - Launching and using the chat

Yuhuuu! We're done. Now, let's start the chat:
```sh
redis-server &
node app.js
```

In your favorite web browser, visit `localhost:8080`.
@@ -0,0 +1,20 @@
{
"name": "realtimechat",
"version": "0.0.0",
"homepage": "https://github.com/kimhogeling/realtimechat",
"authors": [
"Kim Hogeling <kim.hogeling@s24.com>"
],
"license": "Proprietary",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"socket.io-client": "~1.3.4"
}
}
@@ -0,0 +1,25 @@
{
"name": "realtimechat",
"version": "1.0.0",
"description": "Created with NodeJS, Express, socket.io and redis.",
"main": "app.js",
"dependencies": {
"express": "^4.12.0",
"redis": "^0.12.1",
"socket.io": "^1.3.4"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/kimhogeling/realtimechat.git"
},
"author": "Kim Hogeling <kim.hogeling@s24.com>",
"license": "Proprietary",
"bugs": {
"url": "https://github.com/kimhogeling/realtimechat/issues"
},
"homepage": "https://github.com/kimhogeling/realtimechat"
}